<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const person = {
      name: '张三',
      age: 18,
      sex: '男',
      hobby: ['看电影', '看小说', '看游戏']
    }
    for (const key in person) {
      console.log(key, person[key]);
    }
  </script>
</body>

</html>